package com.ddtech.business.practice.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ddtech.business.bank.entity.QuestionBankQuestionOption;
import com.ddtech.business.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 练习用户题目选项信息
 * </p>
 *
 * @author bin_pu
 * @since 2023-05-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@NoArgsConstructor
@TableName("practice_user_question_option")
@ApiModel(value="PracticeUserQuestionOption对象", description="练习用户题目选项信息")
public class PracticeUserQuestionOption extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "练习id")
    private String practiceId;

    @ApiModelProperty(value = "学员id")
    private String userId;

    @ApiModelProperty(value = "问题id")
    private String questionId;

    @ApiModelProperty(value = "答案选项描述")
    private String answerDesc;

    @ApiModelProperty(value = "答案图片")
    private String answerImg;

    @ApiModelProperty(value = "是否为正确答案 0否 1是")
    private Integer isTrue;

    @ApiModelProperty(value = "排序号")
    private Long orderNum;

    public PracticeUserQuestionOption(QuestionBankQuestionOption questionBankQuestion) {
        this.orderNum = questionBankQuestion.getOrderNum();
        this.answerDesc = questionBankQuestion.getAnswerDesc();
        this.answerImg = questionBankQuestion.getAnswerImg();
        this.isTrue = questionBankQuestion.getIsTrue();
    }


}
